<template>
	<!-- <view class="audit-container"> -->
	<view>
		<pageAduit
			:pageUrl="pageUrl"
			:salesContractData="salesContractData"
			:formFields="formFields"
			:formOptions="formOptions"
			:detailColumns="detailColumns"
			@masterDate="masterDate"
		></pageAduit>
	</view>
</template>

<script>
export default {
	data() {
		return {
			pageUrl: 'q_aftersale',
			salesContractData: {
				workTable: 'workTable',
				tableKey: 'tableKey'
			},
			//4、配置当前表要显示的字段
			formFields: {
				Voucher_sub: '',
				Client: '',
				Maintain_state: '',
				Contract_state: '',
				Remark:''
			},
			//5、配置当前显示表单参数，可以直接从生成的SellOrderOptions.js页面将editFormFields与editFormOptions复制过来
			formOptions: [
				{
					title: 'ID',
					required: true,
					field: 'Aftersale',
					hidden: true,
					readonly: true
				},
				{
					title: '单据编码',
					field: 'Voucher_sub',
					readonly: true
				},
				{
					title: '客户',
					field: 'Client',
					readonly: true,
					data: [],
					key: '客户'
				},
				{
					title: '维修状态',
					field: 'Maintain_state',
					readonly: true,
					data: [],
					key: '维修状态'
				},
				{
					title: '合同状态',
					field: 'Contract_state',
					readonly: true,
					data: [],
					key: '合同状态'
				},
				{
					title: '备注',
					field: 'Remark',
					readonly: true
				}
			],
			detailColumns: [
			]
		};
	},
	methods: {
		masterDate(val) {
			Object.assign(this.formFields, val);
		}
	},
	onLoad(options) {
		console.log('options', options);
		this.salesContractData = {
			workTable: options.workTable,
			tableKey: options.tableKey
		};
	}
};
</script>

<style lang="less" scoped>
.audit-container {
	position: absolute;
	height: 100%;
	width: 100%;
	overflow-y: scroll;
	background: #f9f9f9;
	padding: 20rpx;
	box-sizing: border-box;

	.audit-form,
	.audit-action {
		border-radius: 5px;
		background: #ffff;
	}
}
</style>
